package com.example.demo.modules.oss.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.example.demo.modules.oss.entity.ImageList;
import com.example.demo.modules.oss.mapper.ImageListMapper;
import com.example.demo.modules.oss.service.ImageListService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;


@Service
public class ImageListServiceImpl extends ServiceImpl<ImageListMapper, ImageList> implements ImageListService {

    @Autowired
    private ImageListMapper imageListMapper;

    //查询所有
    @Override
    public List<ImageList> listAll(QueryWrapper queryWrapper) {
        List<ImageList> imageLists = this.list(queryWrapper);
        return imageLists;
    }

    //条件查询
        @Override
    public ImageList listOne(Long id) {
        ImageList imageList = this.getById(id);
        return imageList;
    }

    //保存
        @Override
    public int insert(ImageList imageList){
        return imageListMapper.insert(imageList);

    }

}
